<template>
  <div>
    <div class="box">
      <el-form ref="form" :model="form" label-width="80px">
        <el-form-item label="标题">
          <el-input v-model="form.name"></el-input>
        </el-form-item>
        <el-form-item label="内容">
          <el-input type="textarea" rows="6" v-model="form.desc"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">提交</el-button>
        </el-form-item>
      </el-form>
    </div>

    <p class="my_suggest">我的建议列表</p>
    <el-table :data="list" border v-loading="loading" style="width: 100%">
      <el-table-column prop="name" label="户主"> </el-table-column>
      <el-table-column prop="mobile" label="户主手机号"> </el-table-column>
      <el-table-column prop="nativePlace" label="籍贯"> </el-table-column>
      <el-table-column prop="address" label="现住址"> </el-table-column>
      <el-table-column label="户籍状态">
        <template slot-scope="scope">
          {{ houseTypeMap[scope.row.houseType] }}
        </template>
      </el-table-column>
      <el-table-column prop="created" label="创建时间"> </el-table-column>
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button
            v-if="scope.row.houseType == '0'"
            type="primary"
            size="mini"
            @click="detail(scope.row)"
            >家庭信息</el-button
          >
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        title: "",
        content: ""
      },
      list: [],
      loading: false
    };
  },
  methods: {
    onSubmit() {}
  }
};
</script>

<style lang="scss" scoped>
.box {
  width: 500px;
  text-align: center;
  .btn {
    margin-top: 20px;
  }
}
.my_suggest {
  font-size: 14px;
  margin: 20px 0;
}
</style>
